package com.bulk.demo.util;

import com.bulk.demo.component.Component1;

/**
 * 静态工具类中使用 spring bean
 *
 * @author 散装java
 * @date 2022-08-08
 */
public class TestUtil {

    public static String test1() {
        Component1 component1 = ApplicationContextUtil.getBean(Component1.class);
        String random = component1.getRandom();
        System.out.println("random = " + random);
        return random;
    }
}
